home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat1
/
cxref.z
/
cxref
Wrap
Text File
|
1998-10-30
|
8KB
|
198 lines
CCCCXXXXRRRREEEEFFFF((((1111)))) SSSSiiiilllliiiiccccoooonnnn GGGGrrrraaaapppphhhhiiiiccccssss CCCCXXXXRRRREEEEFFFF((((1111))))
NNNNAAAAMMMMEEEE
cxref - generate C program cross-reference
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ccccxxxxrrrreeeeffff [ options ] files
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The _c_x_r_e_f command analyzes a collection of C, yacc, and lex files and
attempts to build a cross-reference table. It produces a listing on
standard output of all symbols (auto, static, and global) in each file
separately, or, with the ----cccc option, in combination. Each symbol contains
an asterisk (*) before the declaring reference.
If the environment variable _XPG is defined, _c_x_r_e_f operates in
conformance with the X/Open XPG4 specifications. The format of the
output may differ in accordance to the XPG4 standards.
In addition to the ----DDDD, ----IIII ----nnnnoooossssttttddddiiiinnnncccc and ----UUUU options [which are interpreted
just as they are by _c_c(1) and _c_p_p(1)], the following _o_p_t_i_o_n_s are
interpreted by _c_x_r_e_f:
----cccc Print a combined cross-reference of all input files.
----hhhh Do not print column headers.
----wwww<_n_u_m> Width option which formats output no wider than <num> (decimal)
columns. This option will default to 80 if <num> is not
specified or is less than 51. If _XPG is set then there should
be at least one space between -w and num.
----oooo file Direct output to _f_i_l_e.
----ssss Operate silently; do not print input file names.
----tttt Format listing for 80-column width.
----vvvv Print on standard error the arguments passed to sub-passes and
such other information as seems interesting.
----eeeexxxxcccclllluuuuddddeeee _r_e_g_e_x
excludes cross-reference data from files whose name matches
_r_e_g_e_x, where _r_e_g_e_x is a regular expression(see _r_e_g_e_x(3)).
----iiiinnnncccclllluuuuddddeeee _r_e_g_e_x
includes cross-reference data from files whose name matches
_r_e_g_e_x, where _r_e_g_e_x is a regular expression(see _r_e_g_e_x(3)). By
default everything in the named files is cross-referenced. For
example, to cross-reference leaving out all headers from
/usr/include but including <stdio.h>, the following suffices:
Page 1 Release 6.4
CCCCXXXXRRRREEEEFFFF((((1111)))) SSSSiiiilllliiiiccccoooonnnn GGGGrrrraaaapppphhhhiiiiccccssss CCCCXXXXRRRREEEEFFFF((((1111))))
cxref -exclude '/usr/include/.*' -include '.*/stdio.h' test.c
----rrrraaaawwww Instead of being processed into a cross reference output, the raw
cross-reference information from the C compiler is passed directly
to the output. The format of this data is described below.
----rrrraaaawwwwiiiinnnn _f_i_l_e
Pass in to _c_x_r_e_f for formatting the _f_i_l_e as if it were the output of
cxref -raw. The file must be in the proper format: if it is not,
the result will likely be chaos.
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
Most error/warning messages come from the C compiler. The C compiler is
not the same as _c_c.
RRRRAAAAWWWW DDDDAAAATTTTAAAA FFFFOOOORRRRMMMMAAAATTTT
A cross raw reference record (the format may change from release to
release) is a line of white-space separated fields. Each record docu-
ments a single cross-reference instance and is terminated with a new-
line. All data is in plain text. All numbers are in decimal.
ssssyyyymmmmaaaaddddddddrrrr
is the integer internal symbol address. Not used.
ssssyyyymmmmnnnnaaaammmmeeee
is the name of a variable or function.
ccccooooddddeeee is one of D,M,A, or R. D if this is a declaration. M if this is a
modification of the variable. A if the address is taken. R if this
is a reference to the variable or function.
ffffiiiilllleeeennnnaaaammmmeeee
is the source file name where found.
lllliiiinnnneeee----nnnnuuuummmmbbbbeeeerrrr
is the line number where the reference was found.
ccccoooolllluuuummmmnnnn----nnnnuuuummmmbbbbeeeerrrr
is the column number where the reference was found.
ttttyyyyppppeeee is one of B, F, or N. B means this is a function body (so _c_o_d_e
above is D). F means this is a function, not a data variable, and
not a function body (_c_o_d_e may be D, as a declaration, or A, or R).
N means this is not a function.
ssssccccooooppppeeee----lllleeeevvvveeeellll
is an integer giving the current local scope level. Local (inner)
scopes with no declarations are not interesting so they are not
counted.
Page 2 Release 6.4
CCCCXXXXRRRREEEEFFFF((((1111)))) SSSSiiiilllliiiiccccoooonnnn GGGGrrrraaaapppphhhhiiiiccccssss CCCCXXXXRRRREEEEFFFF((((1111))))
iiiinnnncccclllluuuuddddeeee----ddddeeeepppptttthhhh
is an integer giving the current #include nesting depth.
FFFFIIIILLLLEEEESSSS
/usr/bin/cxref
/usr/lib/ecfe
SSSSEEEEEEEE AAAALLLLSSSSOOOO
cc(1)
NNNNOOOOTTTTEEEESSSS
The ----aaaaccccpppppppp option is ignored. There is no way to combine K&R C with ANSI
cpp.
The ----nnnnooooccccpppppppp option is ignored. However, _c_x_r_e_f accepts files suffixed with
._i as C files.
The ----nnnnoooossssttttddddiiiinnnncccc option does not work.
_c_x_r_e_f attempts to understand many of the options normally passed to
_c_c(1). Many options are irrelevant to _c_x_r_e_f so they are silently
ignored. Options not understood by _c_x_r_e_f must not be passed on the com-
mand line.
Since the compiler predefines know and created by _c_c are not identical
to those built into _c_x_r_e_f, it is wise to use ----sssshhhhoooowwww option to _c_c to
create a script file with the -D and -U options shown as being passed to
the compiler. Invoke _c_x_r_e_f via the script (there are too many -D items
to do this command creation reliably on the command line). Edit the
script to remove options that _c_x_r_e_f does not understand.
Some #pragmas known to the regular _c_c command are not known to _c_x_r_e_f, so
useless warnings about unknown pragmas may appear at times.
Page 3 Release 6.4